package com.skycong.hello77.activity.datapicker;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.widget.DatePicker;
import android.widget.TimePicker;

import com.skycong.hello77.R;

import java.util.Calendar;


/**
 * 时间，日期
 * Created by Kiki on 2018/5/22.
 */

public class DataPickerActivity extends Activity {
    private DatePicker datePicker;
    private TimePicker timePicker;
    private Calendar cal;
    private int year;
    private int month;
    private int day;
    private int hour;
    private int miunte;
    private int second;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉默认标题
        setContentView(R.layout.activity_date_time);
        //获取日历对象
        cal = Calendar.getInstance();
        //获取对应的年月日
        year = cal.get(Calendar.YEAR);
        month = cal.get(Calendar.MONTH)+1;
        day = cal.get(Calendar.DAY_OF_MONTH);


    }
}
